import java.util.Scanner;

public class Text108 {
    public static void main(String[] args) {

    }


    public static void main6(String[] args) {
        String key = "asdb";
        int count = 3;
        System.out.println("请输入密码：");
        while(count != 0) {
            Scanner sc = new Scanner(System.in);

            String s = sc.nextLine();
            if(key.equals(s) ){
                System.out.println("密码正确，成功登录！");
                break;
            } else if (count == 1) {
                count--;
                System.out.println("密码输入错误三次，程序已退出。");
            } else{
                System.out.println("密码错误，请重新输入：");
                count--;
            }
        }
    }

    public static void main5(String[] args) {
        int n = 123;
        while(n != 0){
            System.out.println(n % 10);
            n /= 10;
        }
    }



    public static void main4(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个2~20的整数：");
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if(i ==j || i + j ==n-1) {
                    System.out.print("*");
                }
                else {
                    System.out.print(" ");
                }

            }
            System.out.println();
        }
        sc.close();
    }



    public static void main3(String[] args) {
        double sum = 0;
        int i = 0;
        for (i = 1; i <= 100 ; i++) {
            sum += Math.pow(-1, i-1)*1/i;
        }
        System.out.println(sum);
    }



    public static void main2(String[] args) {
        int year = 1000;
        for (int i = year; i <= 2000; i++) {
            if(i%400 == 0  || (i%4 == 0 && i%100 != 0 )){
                System.out.println(i);
            }
        }
    }



    public static void main1(String[] args) {
        int count = 0;
        for (int i = 9; i <101 ; i++) {
            int temp = i;
            while(temp != 0) {
                if (temp % 10 == 9) {
                    count++;
                }
                temp/=10;
            }
        }
        System.out.println(count);
    }
}
